function updateStatus() {
    $.ajax({
            url:getStatusUrl,
            success:function (data, textStatus, jqXHR) {
                if (data != null) {
                    setTimeout('updateStatus()', 1000);
                    updateProgressBar(data);
                }
            }
        }
    );
}

function updateProgressBar(data) {
    var percent = (data.md5Processed / data.totalCount) * 100;
    $('#overallProgress').animate({width:percent.toFixed(0) + "%"}, 300, function () {
        var fixedPercent = percent.toFixed(0) + '%';
        if (fixedPercent != 'NaN%')
            $('#overallProgressText').html(fixedPercent);
    });
}

$(document).ready(function () {
    updateStatus()
});
